home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / util / misc / DragBox.lha / DragBox.txt < prev    next >
Text File  |  1998-10-30  |  8KB  |  250 lines

  1.  
  2. -DragBox- v1.3 (30.10.98)
  3.  
  4.  
  5. Distribution
  6. ************
  7.  
  8.    Copyright (C) 1998 Juha 'Asa' Pinola
  9.  
  10.    DragBox is available as freeware.  That is, it may be freely distributed
  11. in  unmodified  form  with  no changes what so ever, but you may not charge
  12. more than  a nominal fee covering distribution costs.  However, donations
  13. are welcome.
  14.  
  15.    If  you use this software in a commercial or shareware software product,
  16. please   consider  giving  the  author  and  preferably  each  one  of  the
  17. contributors an original or registered version of your work.
  18.  
  19.    If you wish to distribute this software with a hardware product, contact
  20. the author.  Distribution of DragBox with hardware products is not free.
  21.  
  22.    THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS "AS IS" AND ANY
  23. EXPRESS  OR  IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  24. WARRANTIES  OF  MERCHANTABILITY  AND  FITNESS  FOR A PARTICULAR PURPOSE ARE
  25. DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY
  26. DIRECT,  INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  27. (INCLUDING,  BUT  NOT  LIMITED  TO,  PROCUREMENT  OF  SUBSTITUTE  GOODS  OR
  28. SERVICES;  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  29. CAUSED  AND  ON  ANY  THEORY  OF  LIABILITY,  WHETHER  IN  CONTRACT, STRICT
  30. LIABILITY,  OR  TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  31. OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
  32. DAMAGE.
  33.  
  34. ****************************************
  35.  
  36.  
  37. Installing
  38. ----------
  39.  
  40. Just copy DragBox to c:DragBox or somewhere else.
  41.  
  42. And try run the included DragShell.info from its icon
  43. and see what this program does.
  44.  
  45. For faster response insert a line:
  46. "resident c:dragbox pure >nil:"    to your s:startup-sequence
  47. or s:user-startup
  48.  
  49.  
  50. ****************************************
  51.  
  52.  
  53. The Author
  54. ----------
  55.  
  56.    The author can be reached at the following addresses:
  57.  
  58. Electronic mail
  59.      jpinola@cs.joensuu.fi
  60.  
  61. World-Wide Web
  62.      http://cs.joensuu.fi/~jpinola
  63.  
  64. IRC: Asa/#amigafin/#amycoders
  65.  
  66.  
  67. ****************************************
  68.  
  69.  
  70. Example usage:
  71.  
  72.  newcli from s:shell-startup window con:`DragBox`/DragShell/CLOSE
  73.  newcli from s:shell-startup window kcon:`DragBox center font times.font`/Dragbox rules/CLOSE
  74.  newcli window con:`DragBox w 300 h 100`/DragShell/CLOSE
  75.  newcli window con:`DragBox 10 10 300 100 c`/DragShell/CLOSE
  76.  newcli window con:`DragBox col_text ffffff`/DragShell/CLOSE
  77.  
  78. Or edit sys:system/shell.info
  79. and edit the tooltypes:
  80.  WINDOW=con:`DragBox w 600 h 300 c min_w 200 min_h 50`/Shell/CLOSE
  81.  
  82. You can change the return format:
  83.  DragBox format "left %ld top %ld "   (Only x,y coords)
  84.  DragBox format "x=%ld y=%ld w=%ld h=%ld"   (All coords)
  85.  
  86. Or change the environment variable:
  87.  DragBox env DRAGBOX_DEFAULTS2
  88.  
  89. To clone a window make an environment variable:
  90.  setenv DRAGBOX_CLONE "RELATIVE SIZE_FROM_ACTIVE MIDDLE"
  91. Then add a hotkey to somewhere (ie. MCP's Execute command hotkey)
  92. And se execution line to:
  93.  newcli from s:shell-startup window con:`dragbox env DRAGBOX_CLONE`/Clone Shell/CLOSE
  94.  
  95. To set alternative position for shell window:
  96.  DragBox format "%ld/%ld/%ld/%ld/%s///ALT %ld/%ld/%ld/%ld" ax +10 ay -40 aw 100 ah 400
  97. Sets alternative position to X +10 Y -40 Width 100 Height 400
  98.  
  99.  
  100.  
  101. ****************************************
  102.  
  103.  
  104. Command line parameters:
  105.  
  106. "X=DEF_X/N,Y=DEF_Y/N,W=DEF_W/N,H=DEF_H/N,C=CENTER/S,
  107.  L=LEFT/S,M=MIDDLE/S,R=RIGHT/S,F=FONT/K,FS=FSIZE/N/K,
  108.  MIW=MIN_W/N/K,MIH=MIN_H/N/K,MAW=MAX_W/N/K,MAH=MAX_H/N/K,
  109.  CBACK=COL_BACK/K,CBRIGHT=COL_BRIGHT/K,CDARK=COL_DARK/K,CSHADOW=COL_SHADOW/K,CTEXT=COL_TEXT/K,
  110.  WX=WIN_X/N/K,WY=WIN_Y/N/K,NOW=NOWIN/S,
  111.  FO=FORMAT/K,ENV/K,
  112.  TO=TIME_OUT/N/K,AD=ADRAG/S,
  113.  REL=RELATIVE/S,SFA=SIZE_FROM_ACTIVE/S,
  114.  PTS=PASSTHRU_STRING/K,AX=ALT_X/K,AY=ALT_Y/K,AW=ALT_W/K,AH=ALT_H/K"
  115.  
  116. X                = Default x
  117. Y                = Default y
  118. W                = Default width
  119. H                = Default height
  120. C                = Dragbox is in the middle of mouse pointer
  121. L                = Left button
  122. M                = Middle button
  123. R                = Right button
  124. F                = Name of the font
  125. FS               = Size of the font
  126. MIN_W            = Minimum width allowed
  127. MIN_H            = Minimum height allowed
  128. MAX_W            = Maximum width allowed
  129. MAX_H            = Maximum height allowed
  130. COL_BACK         = Color for background        (example COL_BACK 23ff00   is 0x23 , for red 0xff for green , and 0x00 for blue)
  131. COL_BRIGHT       = Color for bright edge of window
  132. COL_DARK         = Color for dark edge of window
  133. COL_SHADOW       = Color for shadow of text
  134. COL_TEXT         = Color for text
  135. WIN_X            = left edge coord for the coords window
  136. WIN_Y            = top edge coord for the coords window
  137. NOWIN            = no coords window
  138. FORMAT           = Format of return string. %ld for number (x,y,w,h)
  139. ENV              = Set name of the environment variable. (use only names no paths! default: DRAGBOX_DEFAULT)
  140. TIME_OUT         = dragbox time out. -1 for infinite (default is 20 intuiticks aprox)
  141. ADRAG            = Box can be dragged after resize operation
  142. RELATIVE         = Dragbox is relative to starting position of mouse
  143. SIZE_FROM_ACTIVE = Starting size is taken from currently active window (disables CENTER/S and ADRAG/S)
  144. PASSTHRU_STRING  = Puts this string to %s position in format string
  145. ALT_X            = Alternative x  (absolute values. use - or + sign to relative values)
  146. ALT_Y            = Alternative y
  147. ALT_W            = Alternative w
  148. ALT_H            = Alternative h
  149.  
  150. ****************************************
  151.  
  152.  
  153. Env variable:
  154.  
  155. DRAGBOX_DEFAULTS = [as command line]
  156.  
  157. Example: ( "setenv DRAGBOX_DEFAULTS DEF_W 600 MIDDLE FONT topaz.font FSIZE 8" )
  158.          ( "setenv DRAGBOX_DEFAULTS COL_SHADOW 000000 COL_TEXT ffffff" )
  159.  
  160. (copy env:DRAGBOX_DEFAULTS to envarc:)
  161.  
  162.  
  163. ****************************************
  164.  
  165. Notes and bugs:
  166.  
  167. Use middle or right mouse button with this (right is default),
  168. because WB uses left button with it's dragbox..
  169. Trashes the screen if something moves under the dragbox.
  170.  
  171. Dragbox quits when:
  172. 1. Selected button is pressed and released
  173. 2. When coord window is deactived (if you have sunpopup or something, sorry)
  174. 3. Command line and/or env variable is corrupt. (returns factory defaults)
  175. 4. Keys Return/Esc/Spacebar is pressed
  176. 5. The format string format is 4-integers 1-string 4-integers ONLY!
  177.      ie.  "%ld %ld %ld %ld %s %ld %ld %ld %ld"
  178.      NO!  "%ld %ld %s %ld %s %ld %ld"                Propably crashes
  179. 6. Atleast 4096 stack
  180.  
  181. (factory defaults:
  182. "X 0 Y 0 W 200 H 200
  183.  RIGHT FONT webfixed.font FSIZE 12
  184.  MIN_W 30 MIN_H 30 MAX_W 10000 MAX_H 10000
  185.  COL_BACK 777777 COL_BRIGHT ffffff COL_DARK 000000 COL_SHADOW 333333 COL_TEXT cccccc"
  186.  FORMAT "%ld/%ld/%ld/%ld" ENV DRAGBOX_DEFAULT
  187.  TIME_OUT 20"
  188. )
  189.  
  190.  
  191. ****************************************
  192.  
  193. History:
  194.  
  195. --------------
  196. v 1.3
  197.  
  198. + PTS=PASSTHRU_STRING/K added
  199. + AX=ALT_X/K,AY=ALT_Y/K,AW=ALT_W/K,AH=ALT_H/K added
  200. - Need more stack now ?!  If you run this from Shell.info then you
  201.   should have atleast 4096 stack set. Lockup if not enough stack.
  202.  
  203. --------------
  204. v 1.2
  205.  
  206. + SFA=SIZE_FROM_ACTIVE/S added
  207. + REL=RELATIVE/S added
  208.  
  209. --------------
  210. v 1.1
  211.  
  212. + Check for too small width/height. (less than 1 x 1)
  213.  
  214. --------------
  215. v 1.00
  216.  
  217. + Less flickering lines
  218. + ADRAG/S added
  219. + TIME_OUT/N/K added
  220. + WIN_X/N/K,WIN_Y/N/K,NOWIN/S added
  221. + Some fixes
  222.  
  223. --------------
  224. v 1.00b
  225.  
  226. --------------
  227. v 0.99b
  228.  
  229. + ENV/K added
  230.  
  231. --------------
  232. v 0.99
  233.  
  234. + FORMAT/K added
  235.  
  236. --------------
  237. v 0.98
  238.  
  239. + COL_BACK/K,COL_BRIGHT/K,COL_DARK/K,COL_SHADOW/K,COL_TEXT/K added
  240. + MIN_W/N/K,MIN_H/N/K,MAX_W/N/K,MAX_H/N/K added
  241.  
  242. --------------
  243. v 0.94
  244.  
  245. + CENTER/S fixed
  246. + Only one global variable now (DRAGBOX_DEFAULTS)
  247.     Old variables are now ignored, kill them.
  248.  
  249.  
  250.